<!-- <script type="text/javascript">
           jQuery(document).ready(function(){
               // binds form submission and fields to the validation engine
               jQuery("#CriaderoInsertarForm").validationEngine();
           });
 </script>-->
 <script type="text/javascript">
    jQuery(document).ready(function() {
       
    var sheepItForm = jQuery('#sheepItForm').sheepIt({
        separator: '',
        allowRemoveLast: true,
        allowRemoveCurrent: true,
        allowRemoveAll: true,
        allowAdd: true,
        allowAddN: true,
        maxFormsCount: 20,
        minFormsCount: 0,
        iniFormsCount: 1
    });
});
</script>

<!-- Columns -->
<div id="cols" class="box"> 
<div class="grid_9">
<div class="box">
<div class="header">
<?php echo $this->Html->image('icons/packs/fugue/16x16/ui-text-field-format.png'); ?>
<h3>Editar registro Criadero Nro <?php echo $id ?></h3>
<span></span>
</div>
<?php echo $this->Form->create('Criadero'); ?>  
<div class="content">

   <div class="_50">
      <label>Propietario</label>
      <p>
      <?php echo $this->Form->select('propietario_id', $propietarios, array('class' =>
'required')); ?>
     </p>
   </div>
   <div class="_50">
      <label>Copropietario</label>
      <p>
      <?php echo $this->Form->select('copropietario_id', $propietarios, array('class' =>
'required')); ?>
      </p>
   </div>
   <div class="_50">
      <label>Direccion Criadero</label>
      <p>
      <?php echo $this->Form->text('direccion') ?>
      </p>
   </div>
   <div class="_50">
   <label>Departamento</label>
   <p>
   <?php echo $this->Form->select('departamento_id', $departamentos); ?>
   </p>
   </div>
   <div class="_50">
   <label>	Telefonos fijos</label>
   <p>
   <?php echo $this->Form->text('telefono1') ?>&nbsp;
   <?php echo $this->Form->text('telefono2') ?>
   </p>
   </div>
   <div class="_50">
   <label>	Celulares</label>
   <p>
   <?php echo $this->Form->text('celular1') ?>&nbsp;
   <?php echo $this->Form->text('celular2') ?>
   </p>
   </div>
   <div class="_50">
   <label>	Email 1</label>
   <p>
   <?php echo $this->Form->text('email1') ?>&nbsp;
   </p>
   </div>
   <div class="_50">
   <label>	Email 2</label>
   <p>
   <?php echo $this->Form->text('email2') ?>
   </p>
   </div>
   <div class="_100">
   <label>P&acute;gina web</label>
   <p>
   <?php echo $this->Form->text('paginaweb') ?>
   </p>
   </div>
   <div class="_50">
   <label>	Escoga si es o no socio</label>
   <p><?php echo $this->Form->radio('tipo_id', $tipos) ?></p>
   </div>
   <div class="_50">
   <label>	Desde fecha</label>
				   <p>
                   <?php echo $this->Form->date('fecha_desde', array('value' =>
$fecha)); ?>
                   </p>
				</div>
                <?php if ($this->data['Criadero']['nombre'] != null): ?>
   <div class="_100">
      <label>Nombre afijo</label>
      <p>
      <?php echo $this->Form->text('Criadero.nombre') ?>
      </p>
   </div>
   <?php else: ?>

				<div class="_100">
					
					<label>OBSERVACIONES CRIADERO</label>
                </div>
                <?php
    $i = 0;
    foreach ($observaciones as $observacion): ?>
                <div class="_50">
                   <label>Nombre <?php echo $i + 1 ?> criadero propuesto</label>
                   <p>
                   <?php echo $this->Form->hidden(null, array('value' => $observacion['id'],
'name' => "data[Observacionesinscripcioncriadero][$i][id]")) ?>
                    <?php echo $this->Form->textarea(null, array('value' => $observacion['observacion'],
'name' => "data[Observacionesinscripcioncriadero][$i][observacion]")); ?>
                   </p>
				</div>
                <div class="_25">
                <label>Obs <?php echo $i + 1 ?> Exclusivo Of Nac</label>
					<p>
                    <?php echo $this->Form->textarea(null, array('value' => $observacion['obsexclusivo'],
'name' => "data[Observacionesinscripcioncriadero][$i][obsexclusivo]")); ?>
                   </p>
				</div>
                <div class="_25">
                   <label></label>
                   <p>
                   <?php $valores = array('si' => 'seleccionar') ?>
                   <?php echo $this->Form->radio(null, $valores, array('name' =>
"data[Observacionesinscripcioncriadero][$i][select]")) ?>
                   </p>
                </div>
                <?php
        $i++;
    endforeach; ?> 
   <?php endif; ?>
				<div class="_100">
					<?php echo $this->Form->input('estado', array(
        'type' => 'select',
        'options' => $opt,
        'selected' => '1')); ?>
					 <?php $fecha = date("Y-m-d H:m:s");
    echo $this->Form->hidden('fecha_registro', array("value" => $fecha)); ?>
				</div>
									
									
</div>
<div class="actions">
   <div class="actions-left">
      <input type="reset" value="Limpiar" />
   </div>
   <div class="actions-right">
   <?php $options = array('Value' => 'Editar') ?>
   <?php echo $this->Form->end($options); ?>										
   </div>
</div>
</div> <!-- End of .box -->
</div> <!-- End of .grid_6 -->
 <!-- /content -->
</div>
  
   